﻿using System.Data.Objects;
using FPP.Models;

namespace FPP.Tests.Models
{
    public class FakeFppEntities : IFppEntities
    {
        public IObjectSet<FamousPerson> FamousPersons
        {
            get { return _famouspersons ?? (_famouspersons = new FakeObjectSet<FamousPerson>()); }
            set { _famouspersons = value as FakeObjectSet<FamousPerson>; }
        }
        private FakeObjectSet<FamousPerson> _famouspersons;

        public IObjectSet<WikiLink> WikiLinks
        {
            get { return _wikiLinks ?? (_wikiLinks = new FakeObjectSet<WikiLink>()); }
            set { _wikiLinks = value as FakeObjectSet<WikiLink>; }
        }
        private FakeObjectSet<WikiLink> _wikiLinks;

        public IObjectSet<Pool> Pools
        {
            get { return _pools ?? (_pools = new FakeObjectSet<Pool>()); }
            set { _pools = value as FakeObjectSet<Pool>; }
        }
        private FakeObjectSet<Pool> _pools;

        public IObjectSet<User> Users
        {
            get { return _users ?? (_users = new FakeObjectSet<User>()); }
            set { _users = value as FakeObjectSet<User>; }
        }
        private FakeObjectSet<User> _users;

        public IObjectSet<BachelorGame> BachelorGames
        {
            get { return _bachelorGames ?? (_bachelorGames = new FakeObjectSet<BachelorGame>()); }
            set { _bachelorGames = value as FakeObjectSet<BachelorGame>; }
        }
        private FakeObjectSet<BachelorGame> _bachelorGames;

        public IObjectSet<BachelorPerson> BachelorPersons
        {
            get { return _bachelorPersons ?? (_bachelorPersons = new FakeObjectSet<BachelorPerson>()); }
            set { _bachelorPersons = value as FakeObjectSet<BachelorPerson>; }
        }
        private FakeObjectSet<BachelorPerson> _bachelorPersons;


        public int SaveChanges()
        {
            return 1;
        }

        public void Dispose() { }
    }
}
